public class demo6 {

    public static void main6(String[] args) {
        final int[]arr={1,2,3,4};


        arr[0]=2;
        System.out.println(arr[0]);
    }
    public static void main(String[] args) {
        String s="world";
        StringBuffer c=new StringBuffer(s);
        c.append(129);
        System.out.println(c);


    }
    public static void main123(String[] args) {
        StringBuilder a=new StringBuilder("edf");
        for (int i = 0; i < 4; i++) {
            a.append(i);//对字符串进行追加


        }
        //System.out.println(a);
        String s=a.toString();
        System.out.println(s);


    }

    public static void main111(String[] args) {
        String c="abc";
        for (int i = 0; i < 4; i++) {
            c+=i;

        }
        System.out.println(c);
    }
    public static void main89(String[] args) {
        String c=new String("hello");
       c=c.intern();
        String d="hello";
        if(c==d)
        {
            System.out.println("c=d");
        }
        else
        {
            System.out.println("c!=d");
        }


    }

    public static void main1(String[] args) {
        String b="hello";
        String c="hello";
        String d=new String("hello");
        System.out.println(b==c);
        System.out.println(c==d);



    }



}
